package com.david;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
public class MainController {



    @Value("${server.port}")
    int port;

    @Value("${spring.application.name}")
    String name;

    @GetMapping
    public String list(){
        return "我是："+name+"我的port："+port;
    }


    @GetMapping("getHi")
    public String getHi(){
        return "hi";
    }
}
